package com.chance.cc.crawler.development.command.publish.xici;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.xici.XiCiRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.job.domain.xici.XiCiTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.trigger.domain.xici.XiCiCrawlerTriggerInfo;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2021/3/16 11:25
 * @Description
 *      西祠胡同
 **/
public class XiCiPublishCrawlerJob {
    private static final String domain = "xici";

    public static void main(String[] args) {
//        publishSimpleCrawlerJob();

//        publishRealtimeCrawlerJob();
        publishTraceCrawlerJob();
//        XiCiCrawlerScript.publishCrawlerNodeScript();
    }

    private static void publishSimpleCrawlerJob(){
        CrawlerJob crawlerJob = XiCiRealtimeCrawlerSchedulerJob.crawlerSchedulejob();
        XiCiCrawlerTriggerInfo.simpleCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,"大河网");
    }

    private static void publishRealtimeCrawlerJob(){
        CrawlerJob crawlerJob = XiCiRealtimeCrawlerSchedulerJob.crawlerSchedulejob();
        XiCiCrawlerTriggerInfo.realtimeCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,"大河网");
    }

    private static void publishTraceCrawlerJob(){
        CrawlerJob crawlerJob = XiCiTraceCrawlerSchedulerJob.crawlerSchedulejob();
        XiCiCrawlerTriggerInfo.traceCrawlerScheduleTriggerInfo(crawlerJob.generateCrawlerKey(),crawlerJob.generateCrawlerTriggerKey(),domain,"大河网");
    }
}
